@extends('ClubLeader/default.app')

@section('title','ClubCoachList')

@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <header class="list-header">
                    <section>俱乐部教练列表</section>
                    <section>
                        <a type="submit" href="{{ route('clubCoach.create') }}" class="add">
                            <span><i class="fa fa-plus-circle fa-lg" aria-hidden="true"></i></span>
                            <span>添加教练信息</span>
                        </a>
                    </section>
                </header>

                <table class="table table-hover table-striped list-table">
                    <tr class="list-table-tr">
                        <th>教练名称</th>
                        <th>教练头像</th>
                        <th>教练简介</th>
                        <th>创建时间</th>
                        <th class="text-right">操作</th>
                    </tr>

                    @foreach($ccoaches as $v)
                        <tr class="content-list">
                            <td>{{ $v->coach_name }}</td>
                            <td> <img src="/uploads/clubs_coach/avatars/{{ $v->coach_avatar }}" width="50px"/></td>
                            <td>{{ $v->coach_intro }}</td>
                            <td>{{ $v->created_at }}</td>
                            <td class="text-right operation">
                                <a href="{{ route('clubCoach.edit', $v->id) }}" class="edit"><i class="fa fa-pencil-square-o fa-lg" aria-hidden="true"></i></a>

                                <form action="{{ route('clubCoach.destory', $v->id) }}" method="POST" style="display: inline;">
                                    <input name="_method" type="hidden" value="DELETE">
                                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                                    <button type="submit" class="delete"><i class="fa fa-trash-o fa-lg" aria-hidden="true"></i></button>
                                </form>
                            </td>
                        </tr>
                    @endforeach
                </table>

                {!! $ccoaches->render() !!}
            </div>
        </div>
    </div>
@endsection